package com.bsj.travel.def.common.DO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author yinhao
 * @version 1.0
 * @description 产品Topic类
 * @date 2023/11/16
 */
@Data
@TableName("tab_product_topic")
public class ProductTopicDO implements Serializable {
    private static final long serialVersionUID = -2601892766490136413L;

    /**
     * 主键ID
     */
    @TableId(value = "topicId", type = IdType.AUTO)
    private Long topicId;

    /**
     * 关联的产品ID
     */
    @TableField("productId")
    private Long productId;

    /**
     * 1: 基础通信Topic 2：物模型通信Topic 3：自定义Topic
     */
    @TableField("type")
    private Integer type;

    /**
     * 功能标签 MqttEventEnum
     */
    @TableField("event")
    private String event;

    /**
     * Topic类
     */
    @TableField("topicClass")
    private String topicClass;

    /**
     * 操作权限 1:发布 2:订阅 3:发布与订阅
     */
    @TableField("purview")
    private Integer purview;

    /**
     * 描述
     */
    @TableField("descr")
    private String descr;

    /**
     * 创建时间
     */
    @TableField("createTime")
    private Date createTime;

    /**
     * 产品key
     */
    @TableField(exist = false)
    private String productKey;

}
